/**
 * Created by HUANG on 2016/1/21.
 */
'use strict';
angular.module('nec-admin.admin')
    .service('adminService', ['$http', 'serverUrl',function ($http, serverUrl) {
        var service = this;
        var url = serverUrl;

        service.searchInfo = function(){
            return $http({
                url: url + '/classes',
                method: 'GET'
            })
        };

        service.itemList = function(){
            return $http({
                url: url + '/subjects',
                method: 'GET'
            })
        };

        service.submitItem = function(classId,sbjId){
            return $http({
                url: url + '/exam',
                method: 'POST',
                params:{
                    classId:classId,
                    sbjId:sbjId
                }
            });
        }
    }]);
